package week07.data_obs4;

/**
 * Created by Daniel on 2018/3/13.
 */
public class ObsTest {
    public static void main(String[] args) {
        //主题--被观察者
        Subject subject = new Subject();

        //观察者，登记 被观察的主题
        Watcher watcher = new Watcher(subject);

        //主题状态改变
        subject.setData("start");
        subject.setData("run");
        subject.setData("stop");
        //
    }
}
